<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"
import="Entity.*"
%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%
List<Message>elist=(List<Message>)request.getAttribute("elist");
 %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<meta charset="UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">  <!-- 以上代码告诉IE浏览器，IE8/9及以后的版本都会以最高版本IE来渲染页面。 -->  
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>计算机实验室预约系统——交流平台</title>
	<link rel="stylesheet" href="http://localhost:8080/OpenExperimentManagementSystem/css/normalize.css">
	<link rel="stylesheet" href="http://localhost:8080/OpenExperimentManagementSystem/css/common.css">

  </head>
  
  <body style="background:url(images/back6.jpg);background-size:100% 100% ; background-attachment: fixed"
  style="padding:20px;">
	<header>
		<div class="logo">
		<a href="http://cs.njust.edu.cn/">
			<img src="http://localhost:8080/OpenExperimentManagementSystem/images/cslogo.png" style="width: 80px;height: 80px;margin-left: 250px;margin-top: 20px;" >
		</a>
			<h1 class="vertical-center">开放性实验辅助管理系统</h1>
		</div>
		<div class="logoff">
			<a href="#"><span><em class="username">${uname}</em>（<em class="usernum">${uid}</em>）</span></a>
			<a href="servlet/LoginServlet?op=exit" id="logout"><img src="http://localhost:8080/OpenExperimentManagementSystem/images/out.png" alt="退出登录"></a>
		</div>
	</header><!-- header结束 -->
	<div class="container" style="margin:20px auto;">
		<nav class="nav-list">
			<a href="StudentPageServlet" class="nav-item" id="nav-item1">
				<span class="iconfont">&#xe63e;</span>
				<span class="item-info">主页</span>
			</a>
			
			<a href="servlet/AllExpServlet" class="nav-item" id="nav-item3">
				<span class="item-info">全部实验</span>
			</a>
			<a href="servlet/SelectServlet" class="nav-item" id="nav-item4">
				<span class="item-info">我的实验</span>
			</a>
			
			<a href="UserCenterServlet" class="nav-item" id="nav-item6">
				<span class="item-info">用户中心</span>
			</a>
			<a href="StudentMessageServlet" class="nav-item" id="nav-item6">
				<span class="item-info">交流平台</span>
			</a>
			<span class="triangle" style="left: 800px;"></span>
		</nav>
		<br>
		<form name="myForm" action="servlet/StudentMessageServlet" method="get">
	  		<input type="hidden" name="op" value="add">
	  		<input type="text" name="message">
		   	<input type="submit" value="添加">
	  	</form><br>
		
		
		
		<div class="content">
			
			<div class="M00" style="min-height: 400px; _height: 400px;">
			    <table width="100%"  border="0" cellspacing="1" cellpadding="0" bgcolor="#e1e1e1" class="List_T">
			        <tr>
			            <td align="center" bgcolor="#b8b8b8" style="width: 164px; ">
			                <strong>发送者学号</strong>
			            </td>
						<td align="center" bgcolor="#b8b8b8">
						    <strong>发送内容</strong>
						</td>
						<td align="center" bgcolor="#b8b8b8" style="width: 89px; ">
						    <strong>状态</strong>
						</td>
			        </tr>
				<% for(int i=0;elist!=null&&i<elist.size();i++){Message e=elist.get(i); %>
					<tr>
					    
					    <td align="center" bgcolor="#FFFFFF">
					    	
			            	<%=e.getSe_number() %> 
			            </td>
			            <td align="center" bgcolor="#FFFFFF" style="width: 614px; ">
			                	<%=e.getMess() %> 
			            </td>
			           
							
					   
					    <% if(e.getStatus()==-1){ %>
			            <td align="center" bgcolor="#FFFFFF" style="width: 614px; ">
			                	未读
			            </td>
			            <% }else{ %>
			            <td align="center" bgcolor="#FFFFFF" style="width: 67px; ">
			                	已读
			            </td>
			            <% } %>
					</tr>
        		   <% } %>  
				</table>
			</div>	
		</div>
	</div>
</body>
</html>
